const path = require('path')

const modules = {}
const files = require.context('./modules', false, /\.js$/)
files.keys().forEach(key => {
  const module = files(key).default
  if (module !== undefined) {
    modules[path.basename(key, '.js')] = module
  }
})

export default modules
